/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.mes.service;

import com.xy.biz.mes.domain.bo.ManufactureOrderBO;
import com.xy.biz.mes.domain.query.ManufactureOrderQuery;
import com.xy.biz.mes.domain.req.SaveManufactureOrderRequest;
import com.xy.lang.domain.Result;
import com.xy.lang.domain.tuples.Triple;

import java.util.Collection;
import java.util.List;

/**
 *
 *
 * @author zsp
 * @date 2022-1-6
 */
public interface ManufactureOrderService {

	/**
	 * 保存
	 *
	 * @param request
	 */
	Result<?> saveManufactureOrder(SaveManufactureOrderRequest request);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	Result<?> saveAllManufactureOrder(Collection<SaveManufactureOrderRequest> collection);

	/**
	 * 更新
	 *
	 * @param manufactureOrderBO
	 */
	Result<?> updateManufactureOrder(ManufactureOrderBO manufactureOrderBO);

	/**
	 * 删除
	 *
	 * @param manufactureOrderId
	 */
	Result<?> deleteManufactureOrder(Long manufactureOrderId);

	/**
	 * 查找一个
	 *
	 * @param manufactureOrderId
	 * @return
	 */
	ManufactureOrderBO getManufactureOrder(Long manufactureOrderId);

	/**
	 * 根据生产项目货品Id查找生产项目对应的物料清单、生产工艺、生产记录模板
	 *
	 * @param productionGoodsId
	 * @return
	 */
	Triple<Long, Long, Long> getBomAndTechniqueAndTemplate(Long productionGoodsId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<ManufactureOrderBO> listManufactureOrderById(Collection<Long> collection, boolean withGoods);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<ManufactureOrderBO> listManufactureOrder(ManufactureOrderQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countManufactureOrder(ManufactureOrderQuery query);

}
